package star.oath;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@ServletComponentScan
@SpringBootApplication(scanBasePackages = {"star.oath.*"})
@MapperScan(basePackages = {"star.oath.**.mapper"})
@EnableConfigurationProperties
@EnableScheduling
public class StarOathApplication {

    public static void main(String[] args) {
        try {
            SpringApplication.run(StarOathApplication.class, args);
        }
        catch (Throwable ex) {  // 注意：用 Throwable 捕获所有错误
            System.err.println("💥 应用启动失败！");
            ex.printStackTrace();
        }
    }

}
